<div class="championships">
<h2><?php __('Championships');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
	<th><?php echo $paginator->sort(__('Name', true), 'strName');?></th>
	<th><?php echo $paginator->sort(__('Real Time', true), 'bRealTime');?></th>
	<th><?php echo $paginator->sort(__('Teams', true), 'iNbTeams');?></th>
	<th><?php echo $paginator->sort(__('Type', true), 'idRule_Types');?></th>
	<th><?php echo $paginator->sort(__('Groups', true), 'Championship_iNbGroups');?></th>
	<th><?php echo $paginator->sort(__('Days', true), 'Championship_iNbMatchsPerGroup');?></th>
	<th><?php echo $paginator->sort(__('Cup Groups', true), 'Cup_iNbGroups');?></th>
	<th><?php echo $paginator->sort(__('Cup Days', true), 'Cup_iNbMatchsPerGroup');?></th>
	<th><?php echo $paginator->sort(__('Playoff SL', true), 'Playoff_iStartingLevel');?></th>
	<th><?php echo $paginator->sort(__('Playoff DE', true), 'Playoff_iDoubleElimination');?></th>
	<th><?php echo $paginator->sort(__('Reward 1st', true), 'Reward_iWinner');?></th>
	<th><?php echo $paginator->sort(__('Reward 2d', true), 'Reward_iLoser');?></th>
	<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($championships as $championship):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td><?php echo $championship['Championship']['strName']; ?></td>
		<td><?php echo $championship['Championship']['bRealTime']; ?></td>
		<td><?php echo $championship['Championship']['iNbTeams']; ?></td>
		<td><?php echo $championship['RuleType']['LocalizedString'][$locale]; ?></td>
		<td><?php echo $championship['Championship']['Championship_iNbGroups']; ?></td>
		<td><?php echo $championship['Championship']['Championship_iNbMatchsPerGroup']; ?></td>
		<td><?php echo $championship['Championship']['Cup_iNbGroups']; ?></td>
		<td><?php echo $championship['Championship']['Cup_iNbMatchsPerGroup']; ?></td>
		<td><?php echo $championship['Championship']['Playoff_iStartingLevel']; ?></td>
		<td><?php echo $championship['Championship']['Playoff_iDoubleElimination']; ?></td>
		<td><?php echo $championship['Championship']['Reward_iWinner']; ?></td>
		<td><?php echo $championship['Championship']['Reward_iLoser']; ?></td>
		<td class="actions">
			<?php echo $html->link(__('View', true), array('action' => 'view', $championship['Championship']['ID'])); ?>
			<?php echo $html->link(__('Edit', true), array('action' => 'edit', $championship['Championship']['ID'])); ?>
			<?php echo $html->link(__('Delete', true), array('action' => 'delete', $championship['Championship']['ID']), null, sprintf(__('Are you sure you want to delete # %s?', true), $championship['Championship']['ID'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>
</div>